package lesson05.blocking_queue;

/**
 * 功能描述
 *
 * @author wileda
 * @date 2023/01/13  14:01
 */
public class Demo_BlockingQueue02 {
    public static void main(String[] args) throws InterruptedException {
        MyBlockingQueue myBlockingQueue = new MyBlockingQueue();
        myBlockingQueue.put(1);
        myBlockingQueue.put(2);
        myBlockingQueue.put(3);
        System.out.println("入队了三个元素");
//        myBlockingQueue.put(4);
        System.out.println(myBlockingQueue.take());
        System.out.println(myBlockingQueue.take());
        System.out.println(myBlockingQueue.take());
        System.out.println(myBlockingQueue.take());
//        System.out.println("入队了四个元素");
    }
}
